package com.atqinke.designpattern.behavioraltype.state.stateplus;

/**
 * @BelongsProject: BasicConnection
 * @BelongsPackage: com.atqinke.designpattern.behavioraltype.state.stateplus
 * @Author: NieHk
 * @CreateTime: 2022-08-29  10:11
 * @Description: 关闭状态
 * @Version: 1.0
 */
public class ClosingState extends LiftState {

    @Override
    public void close() {
        System.out.println("电梯门关闭...");
    }

    @Override
    public void open() {
        super.context.setLiftState(Context.openningState);
        super.context.open();
    }

    @Override
    public void run() {
        super.context.setLiftState(Context.runningState);
        super.context.run();
    }

    @Override
    public void stop() {
        super.context.setLiftState(Context.stoppingState);
        super.context.stop();
    }
}
